<template>
  <div class="one">
    <p>{{ count }}</p>
    <p v-cloak>{{ one }}{{ two }}</p>
    <button @click="count++">+</button>
    <button @click="getThis">查看this</button>
  </div>
</template>
<script>
export default {
  name: "NewHeader",
  data() {
    return { count: 0 };
  },
  // 这里可以接受到传过来的参数
  props: ["one", "two"],
  methods: {
    getThis() {
      console.log(this);
    },
  },
};
</script>

<style>
.one {
  width: 200px;
  height: 200px;
  background-color: aqua;
  text-align: center;
  line-height: 200px;
}
</style>